<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>





    <body>
        <div id="info">
            <div class="box-1" onclick="box1()">
                最外层
                <div class="box-2" onclick="box2()">
                    第二层
                    <div class="box-3" onclick="box3()">
                        第三层
                        <div class="box-4" onclick="bubbles()">最底</div>
                    </div>
                </div>
            </div>
        </div>
        <script>

            function bubbles(e) {
                var ev = e || window.event;
                if (ev && ev.stopPropagation) {
                    //非IE浏览器
                    ev.stopPropagation();
                } else {
                    //IE浏览器(IE11以下)
                    ev.cancelBubble = true;
                }
                console.log("最底层盒子被点击了")
            }




            function box1() {
                console.log("最外层盒子被点击了");
            }

            function box2() {
                console.log("第二个盒子被点击了");
            }

            function box3() {
                console.log("第三个盒子被点击了");
            }
        </script>
    </body>



</body>

</html>